{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/Alvald1/HSE_colab/blob/main/15_Pandas.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "QxiNpxcs24ET"
      },
      "source": [
        "# Pandas\n",
        "\n",
        "Pandas — программная библиотека на языке Python для обработки и анализа данных. Работа pandas с данными строится поверх библиотеки NumPy, являющейся инструментом более низкого уровня. Предоставляет специальные структуры данных и операции для манипулирования числовыми таблицами и временны́ми рядами. [Википедия](https://ru.wikipedia.org/wiki/Pandas)\n",
        "[Pandas](https://pandas.pydata.org/pandas-docs/stable/index.html)\n",
        "\n",
        "Основные структуры данных:\n",
        "* Series - одномерный однородный индексированный массив \n",
        "* DataFrame - многомерная структура, составленная из Series\n",
        "\n",
        "* [Series](https://pandas.pydata.org/pandas-docs/stable/reference/series.html)\n",
        "* [DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/frame.html)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "jgvNlSZQ24EV"
      },
      "outputs": [],
      "source": [
        "import pandas as pd\n",
        "import numpy as np"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kWjyTalA24EW",
        "outputId": "c770039c-0481-4c1c-8806-d28a67e937f2",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        }
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "'1.3.5'"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            }
          },
          "metadata": {},
          "execution_count": 2
        }
      ],
      "source": [
        "pd.__version__"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "baUHxv3w24EX"
      },
      "source": [
        "### Чтение данных из файла"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "scrolled": true,
        "id": "CWHYyLT024EX",
        "outputId": "ac0728cf-036f-4e2e-9f32-71d1e1922cf8",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 426
        }
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                   ARTIST                                   TITLE    YEAR  \\\n",
              "0                  EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986.0   \n",
              "1         MICHAEL JACKSON                                THRILLER  1982.0   \n",
              "2                  EAGLES                        HOTEL CALIFORNIA     NaN   \n",
              "3             THE BEATLES                             THE BEATLES  1973.0   \n",
              "4              BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985.0   \n",
              "5            LED ZEPPELIN                         LED ZEPPELIN IV  1971.0   \n",
              "6              PINK FLOYD                                THE WALL  1979.0   \n",
              "7                   AC/DC                           BACK IN BLACK  1980.0   \n",
              "8            GARTH BROOKS                             DOUBLE LIVE     NaN   \n",
              "9   HOOTIE & THE BLOWFISH                       CRACKED REAR VIEW     NaN   \n",
              "10            THE BEATLES                             WHITE ALBUM  1968.0   \n",
              "11             PINK FLOYD                   DARK SIDE OF THE MOON  1973.0   \n",
              "\n",
              "    CERTIFIED UNITS  (In Millions)  \n",
              "0                               38  \n",
              "1                               33  \n",
              "2                               26  \n",
              "3                               24  \n",
              "4                               23  \n",
              "5                               23  \n",
              "6                               23  \n",
              "7                               22  \n",
              "8                               21  \n",
              "9                               21  \n",
              "10                              19  \n",
              "11                              15  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-5482bc3f-ad29-4d34-b8b8-0ce8052f1329\">\n",
              "    <div class=\"colab-df-container\">\n",
              "      <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986.0</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982.0</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>HOTEL CALIFORNIA</td>\n",
              "      <td>NaN</td>\n",
              "      <td>26</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>LED ZEPPELIN</td>\n",
              "      <td>LED ZEPPELIN IV</td>\n",
              "      <td>1971.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>AC/DC</td>\n",
              "      <td>BACK IN BLACK</td>\n",
              "      <td>1980.0</td>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>GARTH BROOKS</td>\n",
              "      <td>DOUBLE LIVE</td>\n",
              "      <td>NaN</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>HOOTIE &amp; THE BLOWFISH</td>\n",
              "      <td>CRACKED REAR VIEW</td>\n",
              "      <td>NaN</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>WHITE ALBUM</td>\n",
              "      <td>1968.0</td>\n",
              "      <td>19</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>DARK SIDE OF THE MOON</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>15</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "      <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-5482bc3f-ad29-4d34-b8b8-0ce8052f1329')\"\n",
              "              title=\"Convert this dataframe to an interactive table.\"\n",
              "              style=\"display:none;\">\n",
              "        \n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
              "    <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
              "  </svg>\n",
              "      </button>\n",
              "      \n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      flex-wrap:wrap;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "      <script>\n",
              "        const buttonEl =\n",
              "          document.querySelector('#df-5482bc3f-ad29-4d34-b8b8-0ce8052f1329 button.colab-df-convert');\n",
              "        buttonEl.style.display =\n",
              "          google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "        async function convertToInteractive(key) {\n",
              "          const element = document.querySelector('#df-5482bc3f-ad29-4d34-b8b8-0ce8052f1329');\n",
              "          const dataTable =\n",
              "            await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                     [key], {});\n",
              "          if (!dataTable) return;\n",
              "\n",
              "          const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "            '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "            + ' to learn more about interactive tables.';\n",
              "          element.innerHTML = '';\n",
              "          dataTable['output_type'] = 'display_data';\n",
              "          await google.colab.output.renderOutput(dataTable, element);\n",
              "          const docLink = document.createElement('div');\n",
              "          docLink.innerHTML = docLinkHtml;\n",
              "          element.appendChild(docLink);\n",
              "        }\n",
              "      </script>\n",
              "    </div>\n",
              "  </div>\n",
              "  "
            ]
          },
          "metadata": {},
          "execution_count": 3
        }
      ],
      "source": [
        "# !pip install xlrd\n",
        "data = pd.read_excel('Pandas_artists.xlsx')\n",
        "data"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_R0tpfmA24EY"
      },
      "source": [
        "### Первичный анализ данных"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "BjcFVMYj24EY",
        "outputId": "9d330ce1-bdaf-4132-a5bd-1cc6e03d96f1"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986.0</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982.0</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>HOTEL CALIFORNIA</td>\n",
              "      <td>NaN</td>\n",
              "      <td>26</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            ARTIST                                   TITLE    YEAR  \\\n",
              "0           EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986.0   \n",
              "1  MICHAEL JACKSON                                THRILLER  1982.0   \n",
              "2           EAGLES                        HOTEL CALIFORNIA     NaN   \n",
              "3      THE BEATLES                             THE BEATLES  1973.0   \n",
              "4       BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985.0   \n",
              "\n",
              "   CERTIFIED UNITS  (In Millions)  \n",
              "0                              38  \n",
              "1                              33  \n",
              "2                              26  \n",
              "3                              24  \n",
              "4                              23  "
            ]
          },
          "execution_count": 139,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Читаем первые 5 строк таблицы\n",
        "data.head(5)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "W40_I7zm24EY",
        "outputId": "81820058-1cd0-4d77-bf46-9d4f1694e57b"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 12 entries, 0 to 11\n",
            "Data columns (total 4 columns):\n",
            "ARTIST                            12 non-null object\n",
            "TITLE                             12 non-null object\n",
            "YEAR                              9 non-null float64\n",
            "CERTIFIED UNITS  (In Millions)    12 non-null int64\n",
            "dtypes: float64(1), int64(1), object(2)\n",
            "memory usage: 464.0+ bytes\n"
          ]
        }
      ],
      "source": [
        "data.info()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "xeuQM7Dq24EY",
        "outputId": "554bd870-537f-4de5-9200-a443a49272ea"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>count</th>\n",
              "      <td>9.000000</td>\n",
              "      <td>12.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>mean</th>\n",
              "      <td>1977.444444</td>\n",
              "      <td>24.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>std</th>\n",
              "      <td>6.424778</td>\n",
              "      <td>6.120012</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>min</th>\n",
              "      <td>1968.000000</td>\n",
              "      <td>15.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>25%</th>\n",
              "      <td>1973.000000</td>\n",
              "      <td>21.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>50%</th>\n",
              "      <td>1979.000000</td>\n",
              "      <td>23.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>75%</th>\n",
              "      <td>1982.000000</td>\n",
              "      <td>24.500000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>max</th>\n",
              "      <td>1986.000000</td>\n",
              "      <td>38.000000</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "              YEAR  CERTIFIED UNITS  (In Millions)\n",
              "count     9.000000                       12.000000\n",
              "mean   1977.444444                       24.000000\n",
              "std       6.424778                        6.120012\n",
              "min    1968.000000                       15.000000\n",
              "25%    1973.000000                       21.000000\n",
              "50%    1979.000000                       23.000000\n",
              "75%    1982.000000                       24.500000\n",
              "max    1986.000000                       38.000000"
            ]
          },
          "execution_count": 141,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.describe()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "hfKKcP7V24EZ"
      },
      "source": [
        "### Пропуски в данных"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "jcw8HemQ24EZ",
        "outputId": "1dedab01-f611-45f8-94cb-05bad66cab24"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986.0</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982.0</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>LED ZEPPELIN</td>\n",
              "      <td>LED ZEPPELIN IV</td>\n",
              "      <td>1971.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>AC/DC</td>\n",
              "      <td>BACK IN BLACK</td>\n",
              "      <td>1980.0</td>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>WHITE ALBUM</td>\n",
              "      <td>1968.0</td>\n",
              "      <td>19</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>DARK SIDE OF THE MOON</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>15</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "             ARTIST                                   TITLE    YEAR  \\\n",
              "0            EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986.0   \n",
              "1   MICHAEL JACKSON                                THRILLER  1982.0   \n",
              "3       THE BEATLES                             THE BEATLES  1973.0   \n",
              "4        BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985.0   \n",
              "5      LED ZEPPELIN                         LED ZEPPELIN IV  1971.0   \n",
              "6        PINK FLOYD                                THE WALL  1979.0   \n",
              "7             AC/DC                           BACK IN BLACK  1980.0   \n",
              "10      THE BEATLES                             WHITE ALBUM  1968.0   \n",
              "11       PINK FLOYD                   DARK SIDE OF THE MOON  1973.0   \n",
              "\n",
              "    CERTIFIED UNITS  (In Millions)  \n",
              "0                               38  \n",
              "1                               33  \n",
              "3                               24  \n",
              "4                               23  \n",
              "5                               23  \n",
              "6                               23  \n",
              "7                               22  \n",
              "10                              19  \n",
              "11                              15  "
            ]
          },
          "execution_count": 142,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Без сохранения в data\n",
        "data.dropna()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "S4w9Wev724EZ"
      },
      "outputs": [],
      "source": [
        "# data.info()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "RUhqi0oW24EZ",
        "outputId": "ad871632-aaec-48c6-cf1c-622d9350536b"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986.0</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982.0</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>HOTEL CALIFORNIA</td>\n",
              "      <td>0.0</td>\n",
              "      <td>26</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>LED ZEPPELIN</td>\n",
              "      <td>LED ZEPPELIN IV</td>\n",
              "      <td>1971.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979.0</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>AC/DC</td>\n",
              "      <td>BACK IN BLACK</td>\n",
              "      <td>1980.0</td>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>GARTH BROOKS</td>\n",
              "      <td>DOUBLE LIVE</td>\n",
              "      <td>0.0</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>HOOTIE &amp; THE BLOWFISH</td>\n",
              "      <td>CRACKED REAR VIEW</td>\n",
              "      <td>0.0</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>WHITE ALBUM</td>\n",
              "      <td>1968.0</td>\n",
              "      <td>19</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>DARK SIDE OF THE MOON</td>\n",
              "      <td>1973.0</td>\n",
              "      <td>15</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "                   ARTIST                                   TITLE    YEAR  \\\n",
              "0                  EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986.0   \n",
              "1         MICHAEL JACKSON                                THRILLER  1982.0   \n",
              "2                  EAGLES                        HOTEL CALIFORNIA     0.0   \n",
              "3             THE BEATLES                             THE BEATLES  1973.0   \n",
              "4              BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985.0   \n",
              "5            LED ZEPPELIN                         LED ZEPPELIN IV  1971.0   \n",
              "6              PINK FLOYD                                THE WALL  1979.0   \n",
              "7                   AC/DC                           BACK IN BLACK  1980.0   \n",
              "8            GARTH BROOKS                             DOUBLE LIVE     0.0   \n",
              "9   HOOTIE & THE BLOWFISH                       CRACKED REAR VIEW     0.0   \n",
              "10            THE BEATLES                             WHITE ALBUM  1968.0   \n",
              "11             PINK FLOYD                   DARK SIDE OF THE MOON  1973.0   \n",
              "\n",
              "    CERTIFIED UNITS  (In Millions)  \n",
              "0                               38  \n",
              "1                               33  \n",
              "2                               26  \n",
              "3                               24  \n",
              "4                               23  \n",
              "5                               23  \n",
              "6                               23  \n",
              "7                               22  \n",
              "8                               21  \n",
              "9                               21  \n",
              "10                              19  \n",
              "11                              15  "
            ]
          },
          "execution_count": 144,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Без сохранения в data, inplace=False\n",
        "data.fillna(0) "
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "ijF4hIsj24Ea"
      },
      "outputs": [],
      "source": [
        "# data.info()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Dc2P9-aT24Ea",
        "outputId": "6a0f1d02-79e6-40b1-f225-df9e55d4e564"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "YEAR                              1977.444444\n",
              "CERTIFIED UNITS  (In Millions)      24.000000\n",
              "dtype: float64"
            ]
          },
          "execution_count": 146,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.mean()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "SIFwP7Xo24Ea",
        "outputId": "90c506ad-33b9-4532-9bf4-8569dee6fab2"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986.000000</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982.000000</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>HOTEL CALIFORNIA</td>\n",
              "      <td>1977.444444</td>\n",
              "      <td>26</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973.000000</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985.000000</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>LED ZEPPELIN</td>\n",
              "      <td>LED ZEPPELIN IV</td>\n",
              "      <td>1971.000000</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979.000000</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>AC/DC</td>\n",
              "      <td>BACK IN BLACK</td>\n",
              "      <td>1980.000000</td>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>GARTH BROOKS</td>\n",
              "      <td>DOUBLE LIVE</td>\n",
              "      <td>1977.444444</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>HOOTIE &amp; THE BLOWFISH</td>\n",
              "      <td>CRACKED REAR VIEW</td>\n",
              "      <td>1977.444444</td>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>WHITE ALBUM</td>\n",
              "      <td>1968.000000</td>\n",
              "      <td>19</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>DARK SIDE OF THE MOON</td>\n",
              "      <td>1973.000000</td>\n",
              "      <td>15</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "                   ARTIST                                   TITLE  \\\n",
              "0                  EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975   \n",
              "1         MICHAEL JACKSON                                THRILLER   \n",
              "2                  EAGLES                        HOTEL CALIFORNIA   \n",
              "3             THE BEATLES                             THE BEATLES   \n",
              "4              BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II   \n",
              "5            LED ZEPPELIN                         LED ZEPPELIN IV   \n",
              "6              PINK FLOYD                                THE WALL   \n",
              "7                   AC/DC                           BACK IN BLACK   \n",
              "8            GARTH BROOKS                             DOUBLE LIVE   \n",
              "9   HOOTIE & THE BLOWFISH                       CRACKED REAR VIEW   \n",
              "10            THE BEATLES                             WHITE ALBUM   \n",
              "11             PINK FLOYD                   DARK SIDE OF THE MOON   \n",
              "\n",
              "           YEAR  CERTIFIED UNITS  (In Millions)  \n",
              "0   1986.000000                              38  \n",
              "1   1982.000000                              33  \n",
              "2   1977.444444                              26  \n",
              "3   1973.000000                              24  \n",
              "4   1985.000000                              23  \n",
              "5   1971.000000                              23  \n",
              "6   1979.000000                              23  \n",
              "7   1980.000000                              22  \n",
              "8   1977.444444                              21  \n",
              "9   1977.444444                              21  \n",
              "10  1968.000000                              19  \n",
              "11  1973.000000                              15  "
            ]
          },
          "execution_count": 147,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Без сохранения в data, inplace=False\n",
        "data.fillna(data.mean()) "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "35rWzoK-24Ea"
      },
      "source": [
        "### Пример обработки массива данных"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "fMoP5pXL24Eb",
        "outputId": "1902d966-36ca-4c09-846c-2c299108f383"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>CERTIFIED UNITS  (In Millions)</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>HOTEL CALIFORNIA</td>\n",
              "      <td>0</td>\n",
              "      <td>26</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>THE BEATLES</td>\n",
              "      <td>1973</td>\n",
              "      <td>24</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            ARTIST                                   TITLE  YEAR  \\\n",
              "0           EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986   \n",
              "1  MICHAEL JACKSON                                THRILLER  1982   \n",
              "2           EAGLES                        HOTEL CALIFORNIA     0   \n",
              "3      THE BEATLES                             THE BEATLES  1973   \n",
              "4       BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985   \n",
              "\n",
              "   CERTIFIED UNITS  (In Millions)  \n",
              "0                              38  \n",
              "1                              33  \n",
              "2                              26  \n",
              "3                              24  \n",
              "4                              23  "
            ]
          },
          "execution_count": 148,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.fillna(0, inplace=True) \n",
        "data['YEAR'] = data['YEAR'].astype(int)\n",
        "data.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "iir30BK-24Eb",
        "outputId": "878cffda-fa04-4339-99b4-61bc3116bae0"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "Index(['ARTIST', 'TITLE', 'YEAR', 'CERTIFIED UNITS  (In Millions)'], dtype='object')"
            ]
          },
          "execution_count": 149,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.columns"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "m8-QfT-y24Eb"
      },
      "outputs": [],
      "source": [
        "# Переименуем столбец\n",
        "data.rename(columns={data.columns[3]: 'UNITS_mln'}, inplace=True)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "yaYweH-f24Ec"
      },
      "source": [
        "### Фильтрация данных"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "sG8rewb024Ec",
        "outputId": "90b126f6-4177-4c07-de22-5268636aad06"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>UNITS_mln</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>EAGLES</td>\n",
              "      <td>EAGLES/THEIR GREATEST HITS 1971 - 1975</td>\n",
              "      <td>1986</td>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>MICHAEL JACKSON</td>\n",
              "      <td>THRILLER</td>\n",
              "      <td>1982</td>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>AC/DC</td>\n",
              "      <td>BACK IN BLACK</td>\n",
              "      <td>1980</td>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            ARTIST                                   TITLE  YEAR  UNITS_mln\n",
              "0           EAGLES  EAGLES/THEIR GREATEST HITS 1971 - 1975  1986         38\n",
              "1  MICHAEL JACKSON                                THRILLER  1982         33\n",
              "4       BILLY JOEL      GREATEST HITS VOLUME I & VOLUME II  1985         23\n",
              "6       PINK FLOYD                                THE WALL  1979         23\n",
              "7            AC/DC                           BACK IN BLACK  1980         22"
            ]
          },
          "execution_count": 151,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Какие альбомы вышли после 1978\n",
        "data[data['YEAR'] > 1978]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "3ODo1zBZ24Ec",
        "outputId": "6072d895-30d3-4b67-d46b-2b5cf42a6abd"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>ARTIST</th>\n",
              "      <th>TITLE</th>\n",
              "      <th>YEAR</th>\n",
              "      <th>UNITS_mln</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>BILLY JOEL</td>\n",
              "      <td>GREATEST HITS VOLUME I &amp; VOLUME II</td>\n",
              "      <td>1985</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>LED ZEPPELIN</td>\n",
              "      <td>LED ZEPPELIN IV</td>\n",
              "      <td>1971</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>PINK FLOYD</td>\n",
              "      <td>THE WALL</td>\n",
              "      <td>1979</td>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "         ARTIST                               TITLE  YEAR  UNITS_mln\n",
              "4    BILLY JOEL  GREATEST HITS VOLUME I & VOLUME II  1985         23\n",
              "5  LED ZEPPELIN                     LED ZEPPELIN IV  1971         23\n",
              "6    PINK FLOYD                            THE WALL  1979         23"
            ]
          },
          "execution_count": 152,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# Кто заработал 23 млн.\n",
        "data[data['UNITS_mln'] == 23]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8urLQMw-24Ec"
      },
      "source": [
        "### Группировка данных"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "8zlZOcDg24Ec",
        "outputId": "3e5ca8ec-3e06-43b1-e706-46a123a14d6b"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "ARTIST\n",
              "EAGLES                   64\n",
              "THE BEATLES              43\n",
              "PINK FLOYD               38\n",
              "MICHAEL JACKSON          33\n",
              "LED ZEPPELIN             23\n",
              "BILLY JOEL               23\n",
              "AC/DC                    22\n",
              "HOOTIE & THE BLOWFISH    21\n",
              "GARTH BROOKS             21\n",
              "Name: UNITS_mln, dtype: int64"
            ]
          },
          "execution_count": 132,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.groupby(['ARTIST'])[ 'UNITS_mln'].sum().sort_values(ascending=False)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "FyXsQ-MM24Ed",
        "outputId": "74be8dfe-88c2-4ce2-8159-76af12e6066c"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "pandas.core.series.Series"
            ]
          },
          "execution_count": 103,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "type(data.groupby(['ARTIST'])[ 'UNITS_mln'].mean())"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "5htFxkt724Ed",
        "outputId": "b4daebd8-8d80-4e1e-c8ce-3bed6ed7b0a4"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "YEAR\n",
              "0       68\n",
              "1973    39\n",
              "1986    38\n",
              "1982    33\n",
              "1985    23\n",
              "1979    23\n",
              "1971    23\n",
              "1980    22\n",
              "1968    19\n",
              "Name: UNITS_mln, dtype: int64"
            ]
          },
          "execution_count": 154,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data.groupby(['YEAR'])[ 'UNITS_mln'].sum().sort_values(ascending=False)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "uZM7UKhZ24Ed",
        "outputId": "05688578-bcea-4e84-946d-924426ab3031"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>UNITS_mln</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>ARTIST</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>EAGLES</th>\n",
              "      <td>64</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>THE BEATLES</th>\n",
              "      <td>43</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>PINK FLOYD</th>\n",
              "      <td>38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>MICHAEL JACKSON</th>\n",
              "      <td>33</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>BILLY JOEL</th>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>LED ZEPPELIN</th>\n",
              "      <td>23</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>AC/DC</th>\n",
              "      <td>22</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>GARTH BROOKS</th>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>HOOTIE &amp; THE BLOWFISH</th>\n",
              "      <td>21</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "                       UNITS_mln\n",
              "ARTIST                          \n",
              "EAGLES                        64\n",
              "THE BEATLES                   43\n",
              "PINK FLOYD                    38\n",
              "MICHAEL JACKSON               33\n",
              "BILLY JOEL                    23\n",
              "LED ZEPPELIN                  23\n",
              "AC/DC                         22\n",
              "GARTH BROOKS                  21\n",
              "HOOTIE & THE BLOWFISH         21"
            ]
          },
          "execution_count": 156,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "data[['ARTIST','UNITS_mln']].groupby(['ARTIST']).sum().sort_values(by='UNITS_mln', ascending=False)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "_OCcnoNT24Ed",
        "outputId": "e46273e6-4614-4919-8da5-8b4aa472e510"
      },
      "outputs": [
        {
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>UNITS_mln</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>YEAR</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>22.666667</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1968</th>\n",
              "      <td>19.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1971</th>\n",
              "      <td>23.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1973</th>\n",
              "      <td>19.500000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1979</th>\n",
              "      <td>23.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1980</th>\n",
              "      <td>22.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1982</th>\n",
              "      <td>33.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1985</th>\n",
              "      <td>23.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1986</th>\n",
              "      <td>38.000000</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "      UNITS_mln\n",
              "YEAR           \n",
              "0     22.666667\n",
              "1968  19.000000\n",
              "1971  23.000000\n",
              "1973  19.500000\n",
              "1979  23.000000\n",
              "1980  22.000000\n",
              "1982  33.000000\n",
              "1985  23.000000\n",
              "1986  38.000000"
            ]
          },
          "execution_count": 157,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "yu_dt = data[[\"YEAR\", \"UNITS_mln\"]].groupby(['YEAR']).mean()#.sort_values(['UNITS_mln'], ascending=False)\n",
        "yu_dt"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8Mumuf9s24Ee"
      },
      "source": [
        "### Простой график"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "J48aWY0c24Ee",
        "outputId": "7bbe56a4-e68e-4f68-9ff8-0e47174c5bd9"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x1d816d55cc0>]"
            ]
          },
          "execution_count": 187,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3XmYFNW5x/Hv67AjyjayKAbwusZdQshFo6IioleN0biRaKIxGr3R627EmxtXXBKNMdFoNDGC0SRuZAYXVFATERyURUQjEpVhR5BFkGV47x+nOnbGbqZnprurevr3eZ5+urq6TtU7Pd1vnz516hxzd0REpHxsFXcAIiJSXEr8IiJlRolfRKTMKPGLiJQZJX4RkTKjxC8iUmaU+EVEyowSv4hImVHiFxEpM63iDiCT7t27e9++feMOQ0SkZEydOnWZu1fmsm0iE3/fvn2pqamJOwwRkZJhZh/muq2aekREyowSv4hImVHiFxEpM0r8IiJlRolfRKTMKPGLiMSpZ08w++KtZ8+CHVKJX0QkTosXN259Hijxi4iUGSV+EZEyo8QvIlJmGhyywczaAS8DbaPt/+LuPzGzV4BO0WbbAVPc/fgM5euAmdHDj9z92LxELiIiTZLLWD3rgSHuvsbMWgN/M7On3f2g1AZm9hjwVJby69x93zzEKiLS8vTokflEbo8eBTtkg009HqyJHraObp563sw6AUOAJwsSoYhIS7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8ZrmLPbE7+7vuPtQdz+A8AF5P3qqFnjJ3Ze5+1pgHKH9DQgnXYBW7j41y37Xu/vH0fLUaL+7FCDOlPof8Fr+vclkB2BBhl3X8u81yGzbFSrOlHuB99z9Cycho/3m9fVsaqzuPj+6Xw08TOYmnES8pgl6j54GPOPuG919CfB3YAC5v07/2i6qIGzLF5tECh0rZtaakPTHuPvjWfa7yt3XRMvjgNZm1r2Ycbr7guh+CfAERXiPNlbsid+iXhlmthUwEkj1bHgW2NtCr5NWwMHA22lFt9j2a2aVZlYRLfcHdgYy1WSbG2dq3UmENlIA3H0hsNrMBkXNEd8Bnsqw67HAd6Kz/IOAlVHZosQZrb+e8GG+aAv7zevr2ZRYzaxV6kMcJYFjCD/F6xsLnGKhN0q/KNYpxYozTVLeox8BQ6L3WEfCycR3CCcudzazfmbWhvAFNjbDrscCZ0TLJwIvbqHpqiCxRp+h+4HZ7v7zLey3Z6r5z8wGEnLcx0WMs6OZdYrKdCScq8z2Hs3b577RmnNmuLE3wodgIbCR8I13FnAh4Qz9P4BRRBeVRduPAGYRXrhb6u1rLrBbvXXHAtdGy9+Myk4n/Pz7rwLGeQjwWob9DIhifx+4K1UGOBc4N1o24FfRNjNpoMdKvuMk1DSccLJsWnQ7O5+vZx5j7UjoITMjiuUXRL110mONHl8dvabvkqGXUqH/90l6jwJbA3+OjvU2cFnafoZH278PXJ22/lrg2Gi5XVR+DuELtH+h/vfZYiU093r0v0+9T4dn+DxdkPaavgb8Z5Hj7B8de3r0XPprmpfPfT5uunJXRKTMxN7UIyIixaXELyJSZpT4RUTKjBK/iEiZUeIXESkzSvwiImVGiV9EpMwo8YuIlJn/B9UlH8lMHlINAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "import matplotlib.pyplot as plt\n",
        "%matplotlib inline\n",
        "# plt.plot(yu_dt,'rs')\n",
        "# plt.plot(yu_dt.iloc[1:,:],'rs')\n",
        "plt.plot(yu_dt.loc[1968:],'rs-')"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xKR5l9fo24Ee"
      },
      "source": [
        "### Столбчатая диаграмма"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "OoH9cQO324Ee"
      },
      "outputs": [],
      "source": [
        "wthzero = yu_dt.loc[1968:]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "GanlhmzU24Ee",
        "outputId": "74f4ca5f-9958-400b-e670-043ba85e2f2e"
      },
      "outputs": [
        {
          "data": {
            "text/plain": [
              "<BarContainer object of 8 artists>"
            ]
          },
          "execution_count": 180,
          "metadata": {},
          "output_type": "execute_result"
        },
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAEHdJREFUeJzt3X2MZXV9x/H3RxZ8AAwoA9kCumqQSlpZzHSlsfEBfKCQVExLK1pDIma10RYbo0VtUkxrQo3KH02jWeVh/7AgBRVUCm4pltooOuCy7LooQreAbNmhlAA1FYFv/7hn7XSd2bmPM7O/fb+Sm3vO75zfPd9zz53PnHvuOfemqpAk7fuesdwFSJLGw0CXpEYY6JLUCANdkhphoEtSIwx0SWqEgS5JjTDQJakRBrokNWLVUi7siCOOqDVr1izlIiVpn3frrbc+VFVTi823pIG+Zs0aZmZmlnKRkrTPS/Lv/cznIRdJaoSBLkmNMNAlqREGuiQ1wkCXpEYY6JLUCANdkhphoEtSIwx0SWrEkl4pKkktWHP+1wfus+PCMyZQyf/nHrokNcJAl6RGGOiS1AgDXZIaYaBLUiMMdElqhIEuSY0w0CWpEQa6JDXCQ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g96e428Bb+/u35Lk1CQH0gv0k4BfoXdY5sO/9KhLa6F1ACDJK4GfVtXW+Tov1/Kr6k303jY/EzhlQrXtLwbdBo/S2yH5IvAvwDXAC+fpvw54it5r/UXAB5K8mN671D2N+i5roXVYqIbd63YIvcN275/zzm85DFP/PVX1CnrfLvtz4KMD9F9F77DNZ6rqJHqhP5GvGx/pPPSlVFV30ju8QpKXAmd0k+4H/rmqHuqmXUfvyXu063d3134lE3oS+7WXddjtrUxu73yk5VfV/yS5lt7b9U2TqrF1Q26Dx6rqlV2f9cBDVfWhPfq/Dbi+e2e6K8m/0tuTv48+vqJjTOuwUA33dDtYVwNfqKovjbL8UQ1R/3eBJ7u+u5JcQe8zrU/22f9m4P6q2v2u5ComlEX7zB56kiO7+2cAfw58tpt0A/DyJM/p3pK+BvgB8BPghCS7v9DmDfSO3S2bvazD7raz6B3jXBHLT3JIktXd8CrgdODOSdW3PxjyNXBAN/1w4E+Az8/T/17glPQcTO/D9DuZwFd07GUd5q2h+wzrYmB7VX16lGWPw6D10zse/oyuz8H0/g629tu/qv4DuC/J8d18p9LLqPFbik+ah/hk+nJ6x6F+Tm8P/FzgPHqfjv8IuJDuoqhu/j8EttE7NvaJOe3voRfiW4CvAs9fwevwWuA78zzOJ7r+T3f3FyzV8oGj6AXClu75/Rtg1XK/PvaV26jbYE7/p7vHeAC4bL7+wCHA33fb6QfAB+c8zund/HcDH53UOixUA71DodW9jjZ3t9NX2jaYr/6u/66u/ifo7Sh+bYhtsBaY6Z6DrwCHT2J9vVJUkhqxzxxykSTtnYEuSY0w0CWpEQa6JDXCQJekRhjoktQIA12SGmGgS1Ij/hc5sc+jqp1+MgAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "needs_background": "light"
          },
          "output_type": "display_data"
        }
      ],
      "source": [
        "plt.bar(wthzero.index, wthzero['UNITS_mln'], tick_label=wthzero.index)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "FfB0XiIU24Ef"
      },
      "source": [
        "Вопросы и задания в практической работе \"Titanic\""
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3 (ipykernel)",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.9.12"
    },
    "colab": {
      "provenance": [],
      "include_colab_link": true
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}